package cn.shop.cloud.service;


import cn.shop.cloud.web.vo.SeckillGoodVo;

import java.util.List;

/**
 * @program: work
 * @ClassName ISeckillGoodService
 * @description:
 * @author: 李尧坤
 * @create: 2025−01-08 20:14
 * @Version 1.0
 **/

public interface ISeckillGoodService {

    /**
     * 查询t_seckill_goods得到所有参与秒杀商品的数据
     * @return
     */
    public List<SeckillGoodVo> query();

    /**
     *根据seckillId查询出对应本场次的秒杀商品
     * @param seckillId
     * @return
     */
    public SeckillGoodVo find(Long seckillId);

    /**
     *扣减库存
     * @param seckillId
     */
    public void decrStock(Long seckillId);

    /**
     * 库存回补
     * @param seckillId
     */
    public void syncRedisStcokCount(Long seckillId);

    /**
     *
     * @param seckillId
     */
    public void incrStock(Long seckillId);
}
